package SiCong;


import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

public class GameUtil {
	public static String path = "images/SiCongEat/";

	public static Image getImage(String path){
		//图片路径为images/xxx.png
		String u = path.substring(path.lastIndexOf("/")+1);
		System.out.println(u);
		BufferedImage img = null;
		img = new BufferedImage(100,100,BufferedImage.TYPE_INT_BGR);
		try {
			img = ImageIO.read(new File(GameUtil.path+u));
		} catch (IOException e) {
			e.printStackTrace();
		}
		System.out.println(img);
		return img;
	}
}
